<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>系统概览 - 人参管理系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
    <style>
        body {
            font-size: .95rem;
            background: #f8f9fa;
        }
        .main-content {
            min-height: 100vh;
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            padding: 32px 32px 24px 32px;
            margin-top: 32px;
        }
        .overview-title {
            font-size: 2rem;
            font-weight: 600;
            margin-bottom: 32px;
            color: #222;
        }
        .card-overview {
            border: none;
            border-radius: 10px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.06);
            transition: box-shadow 0.2s;
        }
        .card-overview:hover {
            box-shadow: 0 4px 16px rgba(0,0,0,0.10);
        }
        .card-title {
            color: #888;
            font-size: 1.1rem;
        }
        .card-text {
            font-size: 2.2rem;
            font-weight: 600;
            color: #0d6efd;
        }
        .recent-activity-title {
            font-size: 1.2rem;
            font-weight: 500;
            margin-bottom: 16px;
        }
        .table {
            background: #fff;
        }
    </style>
</head>
<body>
    <jsp:include page="../common/header.jsp"/>
    <div class="container-fluid">
        <div class="row">
            <main class="col-md-10 ms-sm-auto col-lg-10 main-content">
                <div class="overview-title">系统概览</div>
                <!-- 系统统计卡片 -->
                <div class="row g-4 mb-4">
                    <div class="col-12 col-sm-6 col-lg-3">
                        <div class="card card-overview text-center">
                            <div class="card-body">
                                <div class="card-title">用户总数</div>
                                <div class="card-text">${totalUsers}</div>
                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-sm-6 col-lg-3">
                        <div class="card card-overview text-center">
                            <div class="card-body">
                                <div class="card-title">生产批次</div>
                                <div class="card-text">${totalBatches}</div>
                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-sm-6 col-lg-3">
                        <div class="card card-overview text-center">
                            <div class="card-body">
                                <div class="card-title">加工批次</div>
                                <div class="card-text">${totalProcessingBatches}</div>
                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-sm-6 col-lg-3">
                        <div class="card card-overview text-center">
                            <div class="card-body">
                                <div class="card-title">设备总数</div>
                                <div class="card-text">${totalEquipment}</div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 最近活动 -->
                <div class="card mt-4">
                    <div class="card-header bg-white border-bottom-0">
                        <span class="recent-activity-title"><i class="fa-solid fa-clock-rotate-left me-2"></i>最近活动</span>
                    </div>
                    <div class="card-body p-0">
                        <div class="table-responsive">
                            <table class="table table-striped mb-0">
                                <thead>
                                    <tr>
                                        <th>时间</th>
                                        <th>用户</th>
                                        <th>操作</th>
                                        <th>详情</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>2024-06-01 10:00</td>
                                        <td>admin</td>
                                        <td>登录系统</td>
                                        <td>--</td>
                                    </tr>
                                    <tr>
                                        <td>2024-06-01 09:50</td>
                                        <td>张三</td>
                                        <td>新增生产批次</td>
                                        <td>批次编号：P20240601</td>
                                    </tr>
                                    <tr>
                                        <td>2024-06-01 09:30</td>
                                        <td>李四</td>
                                        <td>设备维护</td>
                                        <td>设备编号：EQ1001</td>
                                    </tr>
                                    <!-- 可用JSTL循环动态渲染 -->
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>
</body>
</html> 